﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DddCms.Domain;
using AutoMapper;

namespace DddCms.Application.Dto.User
{
    public static class UserDtoExtension
    {
        public static UserDto toDto(this DddCms.Domain.Model.User user)
        {
            Mapper.CreateMap<DddCms.Domain.Model.User, UserDto>();
            return Mapper.Map<DddCms.Domain.Model.User, UserDto>(user);
        }
    }
}
